package com.solution.model;

import static javax.persistence.GenerationType.SEQUENCE;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * QuestionType
 */
@Entity
@Table(name="System_Variable"
    ,schema="public"
)
public class SystemVariable extends AbstractPO{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Long id;
	private String variableName;
	private String variableValue;
	private ClientType clientType;
	private Integer variableType;
    private String createdBy;
    private Date createdOn;
    private String modifiedBy;
    private Date modifiedOn;
    private String rfu1;
    private String rfu2;
    private String rfu3;
    
    @SequenceGenerator(name="generator", sequenceName="system_variable_seq")@Id @GeneratedValue(strategy=SEQUENCE, generator="generator")
    
    
    @Column(name="System_VariableID", unique=true, nullable=false, precision=10, scale=0)
    public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(name="Variable_Name", nullable=false, length=100)
	public String getVariableName() {
		return variableName;
	}
	public void setVariableName(String variableName) {
		this.variableName = variableName;
	}
	
	@Column(name="Variable_Value", nullable=false, length=100)
	public String getVariableValue() {
		return variableValue;
	}
	public void setVariableValue(String variableValue) {
		this.variableValue = variableValue;
	}
	
	@ManyToOne(fetch=FetchType.EAGER, cascade=CascadeType.REFRESH)
    @JoinColumn(name="Client_TypeID")
	public ClientType getClientType() {
		return clientType;
	}
	public void setClientType(ClientType clientType) {
		this.clientType = clientType;
	}
	
	@Column(name="CreatedBy", nullable=false, length=50)
	public String getCreatedBy() {
		return createdBy;
	}
	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}
	
	@Column(name="CreatedOn", nullable=false, length=23)
	public Date getCreatedOn() {
		return createdOn;
	}
	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}
	
	@Column(name="ModifiedBy", length=50)
	public String getModifiedBy() {
		return modifiedBy;
	}
	public void setModifiedBy(String modifiedBy) {
		this.modifiedBy = modifiedBy;
	}
	
	@Column(name="ModifiedOn", length=23)
	public Date getModifiedOn() {
		return modifiedOn;
	}
	public void setModifiedOn(Date modifiedOn) {
		this.modifiedOn = modifiedOn;
	}
	
	@Column(name="RFU1", length=100)
	public String getRfu1() {
		return rfu1;
	}
	public void setRfu1(String rfu1) {
		this.rfu1 = rfu1;
	}
	
	@Column(name="RFU2", length=100)
	public String getRfu2() {
		return rfu2;
	}
	public void setRfu2(String rfu2) {
		this.rfu2 = rfu2;
	}
	
	@Column(name="RFU3", length=100)
	public String getRfu3() {
		return rfu3;
	}
	public void setRfu3(String rfu3) {
		this.rfu3 = rfu3;
	}
	
	@Column(name="Variable_Type", nullable=false, precision=10, scale=0)
	public Integer getVariableType() {
		return variableType;
	}
	public void setVariableType(Integer variableType) {
		this.variableType = variableType;
	}	
}
